const express = require('express');
const router = express.Router();

const activityService = require('../service/activityService')

// 表单验证
const expressJoi = require('@escook/express-joi')
const { activity_delete, activity_insert,activity_update } = require('../rule/activityRule')

router.get('', activityService.activity);

router.get('/byId', activityService.activityById);

router.post('/add', expressJoi(activity_insert), activityService.add);

router.post('/delete',activityService.delete);

router.post('/update',expressJoi(activity_update) ,activityService.update);



module.exports = router;
